export const toRouter = (url, params) => {
  params ? url = url + '?' + params : ''
  uni.navigateTo({
    url
  })
}

export const toSwich = (url) => {
  uni.switchTab({
    url
  })
}

export let innerAudioContext = uni.createInnerAudioContext()


export const showToast = (msg: string)=> {
	uni.showToast({
	  title: msg,
	  icon: 'none',
	  duration: 2000
	});
}

export const showToastLoading = ()=> uni.showLoading({title: '加载中'});
export const closeToast = uni.hideLoading;